extern void isr_eint0();
extern void isr_eint1();

static void delay(int count)
{
    	volatile int i, j = 0;
    	volatile static int loop = 800000000/10000;
    	for(;count > 0;count--)
    		for(i=0;i < loop; i++) { j++; }
}

void main(void)
{
	uart_init();
	led_init();
    	key_init_interrupt();//中断方式处理按键的初始化
    	system_initexception();
    	//intc_init();

	intc_setvectaddr(0, isr_eint0);
	intc_setvectaddr(1, isr_eint1);
	//intc_setvectaddr(KEY_EINT16_19, isr_eint16171819);

	// 使能中断
 	intc_enable(0);
	intc_enable(1);
	//intc_enable(KEY_EINT16_19);    
    while(1)
    {
	putc('!');
	delay(10);
    }
}
